local skynet     = require "skynet"
local bewater    = require "bw.bewater"
local http_agent = require "bw.server.http_agent"
local sname      = require "sname"
local Rank       = bewater.proxy(sname.RANK)
local Hall       = bewater.proxy(sname.HALL)

local M = {
    url = "/center/rank/request",
    auth = true,
    data = {
        appname = "string",
        rankname = "string",
    },
}

function M.handler(_, data, acc)
    local name = data.appname .. "_" .. data.rankname
    return {
        list = Rank.request(name),
    }
end

http_agent.reg(M)
